package com.YCH.article.service.impl;

import com.YCH.article.service.AppADService;
import com.YCH.model.common.dtos.ResponseResult;
import com.YCH.model.common.enums.AppHttpCodeEnum;
import com.YCH.model.mappers.app.TbADMapper;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

@Service
@SuppressWarnings("all")
public class AppADServiceImpl implements AppADService {
    @Autowired
    private TbADMapper tbADMapper;
    @Override
    public ResponseResult loadAD(int Group) {
        // 校验参数
        if (Group <= 0){
            return ResponseResult.errorResult(AppHttpCodeEnum.PARAM_INVALID);
        }
        return ResponseResult.okResult(tbADMapper.loadAD(Group));
    }
}
